/**
 * 
 */
package lu.med.praxiswahl.wahlumed.client.utilities;

import javax.naming.Context;
import javax.naming.NamingException;

import lu.med.praxiswahl.wahlumed.service.beans.AccountingService;
import lu.med.praxiswahl.wahlumed.service.beans.BefundeService;
import lu.med.praxiswahl.wahlumed.service.beans.BillContentService;
import lu.med.praxiswahl.wahlumed.service.beans.BillService;
import lu.med.praxiswahl.wahlumed.service.beans.BufferService;
import lu.med.praxiswahl.wahlumed.service.beans.CalendarService;
import lu.med.praxiswahl.wahlumed.service.beans.CashBookService;
import lu.med.praxiswahl.wahlumed.service.beans.CodeRateIntervalService;
import lu.med.praxiswahl.wahlumed.service.beans.CodeRateService;
import lu.med.praxiswahl.wahlumed.service.beans.CtgService;
import lu.med.praxiswahl.wahlumed.service.beans.CustomerService;
import lu.med.praxiswahl.wahlumed.service.beans.DeliverieService;
import lu.med.praxiswahl.wahlumed.service.beans.DoctorLetterService;
import lu.med.praxiswahl.wahlumed.service.beans.DoctorLetterTemplateService;
import lu.med.praxiswahl.wahlumed.service.beans.DoctorService;
import lu.med.praxiswahl.wahlumed.service.beans.EGravService;
import lu.med.praxiswahl.wahlumed.service.beans.EchoService;
import lu.med.praxiswahl.wahlumed.service.beans.FormularService;
import lu.med.praxiswahl.wahlumed.service.beans.GravTestService;
import lu.med.praxiswahl.wahlumed.service.beans.HollidayService;
import lu.med.praxiswahl.wahlumed.service.beans.InternAnalysisService;
import lu.med.praxiswahl.wahlumed.service.beans.LaborService;
import lu.med.praxiswahl.wahlumed.service.beans.OPBillContentService;
import lu.med.praxiswahl.wahlumed.service.beans.OPBillService;
import lu.med.praxiswahl.wahlumed.service.beans.OPCodeRateService;
import lu.med.praxiswahl.wahlumed.service.beans.OPHonorarKlasseEins_Service;
import lu.med.praxiswahl.wahlumed.service.beans.OPHonorarKlasseZwei_Service;
import lu.med.praxiswahl.wahlumed.service.beans.OPSettlementService;
import lu.med.praxiswahl.wahlumed.service.beans.OrdonanceService;
import lu.med.praxiswahl.wahlumed.service.beans.OrdonanceTemplateService;
import lu.med.praxiswahl.wahlumed.service.beans.PhysicianLetterService;
import lu.med.praxiswahl.wahlumed.service.beans.ReminderService;
import lu.med.praxiswahl.wahlumed.service.beans.ReminderTimerService;
import lu.med.praxiswahl.wahlumed.service.beans.ScanService;
import lu.med.praxiswahl.wahlumed.service.beans.TimerActivatorService;
import lu.med.praxiswahl.wahlumed.service.beans.VersicherungAntraegeService;
import lu.med.praxiswahl.wahlumed.service.beans.ZytologyService;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.AccountingServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.BefundeServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.BillContentServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.BillServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.BufferServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.CalendarServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.CashBookServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.CodeRateIntervalServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.CodeRateServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.CtgServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.CustomerServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.DeliveriesServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.DoctorLetterServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.DoctorLetterTemplateServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.DoctorServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.EGravServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.EchoServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.FormularServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.GravTestServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.HollidayServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.InternAnalysisServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.LaborServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.OPBillContentServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.OPBillServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.OPCodeRateServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.OPHonorarKlasseEins_ServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.OPHonorarKlasseZwei_ServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.OPSettlementServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.OrdonanceServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.OrdonanceTemplateServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.PhysicianLetterServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.ReminderServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.ReminderTimerServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.ScanServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.TimerActivatorServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.VersicherungAntraegeServiceInt;
import lu.med.praxiswahl.wahlumed.service.beans.serviceinterface.ZytologyServiceInt;

import org.apache.log4j.Logger;

/**
 * @author PatrickPierre
 * 
 */
public class /*LookupServiceFactory*/ ContextFactoryRemote implements ContextFactoryRemoteInt{

	private static Logger logger = Logger.getLogger(/*LookupServiceFactory*/ContextFactoryRemote.class);

	private Context context = null;
	
	public /*LookupServiceFactory*/ContextFactoryRemote(){
		
		// 1. Obtaining Context
		try {
			context = JNDILookupClass.getInitialContext();
		} catch (NamingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
					
	}
	
	private static String getLookupModuleName() {

		/*
		 * The app name is the EAR name of the deployed EJB without .ear suffix.
		 * Since we haven't deployed the application as a .ear, the app name for
		 * us will be an empty string
		 */
		String appName = "wahlumed";

		/*
		 * The module name is the JAR name of the deployed EJB without the .jar
		 * suffix.
		 */
		String moduleName = "wahlumedEJB";

		
		/*
		 * AS7 allows each deployment to have an (optional) distinct name. This
		 * can be an empty string if distinct name is not specified.
		 */
		String distinctName = "";

		// Create a look up string name
		String name = "ejb:" + appName + "/" + moduleName + "/" + distinctName;
		//logger.info("Name des Moduls::" + name);
		return name;
	}

	@Override
	public AccountingServiceInt getRemoteAccountingService() {
		
		AccountingServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = AccountingService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = AccountingServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (AccountingServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public BufferServiceInt getRemoteBufferService() {
		BufferServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = BufferService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = BufferServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (BufferServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public BefundeServiceInt getRemoteContextbefundeService() {
		BefundeServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = BefundeService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = BefundeServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (BefundeServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public BillContentServiceInt getRemoteContextBillContentsService() {
		BillContentServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = BillContentService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = BillContentServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (BillContentServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public BillServiceInt getRemoteContextBillService() {
		BillServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = BillService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = BillServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (BillServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public CalendarServiceInt getRemoteContextCalendarService() {
		CalendarServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = CalendarService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = CalendarServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (CalendarServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public CodeRateIntervalServiceInt getRemoteContextCodeRatesIntervalService() {
		CodeRateIntervalServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = CodeRateIntervalService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = CodeRateIntervalServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (CodeRateIntervalServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public CodeRateServiceInt getRemoteContextCodeRatesService() {
		CodeRateServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = CodeRateService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = CodeRateServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (CodeRateServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public CustomerServiceInt getRemoteContextCustomerService() {
		CustomerServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = CustomerService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = CustomerServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (CustomerServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public DoctorServiceInt getRemoteContextDoctorService() {
		DoctorServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = DoctorService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = DoctorServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (DoctorServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public HollidayServiceInt getRemoteContextHollidayService() {
		HollidayServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = HollidayService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = HollidayServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (HollidayServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public InternAnalysisServiceInt getRemoteContextInternAnalysisService() {
		InternAnalysisServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = InternAnalysisService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = InternAnalysisServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (InternAnalysisServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public OrdonanceServiceInt getRemoteContextOrdonanceService() {
		OrdonanceServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = OrdonanceService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = OrdonanceServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (OrdonanceServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public OrdonanceTemplateServiceInt getRemoteContextOrdonanceTemplateService() {
		OrdonanceTemplateServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = OrdonanceTemplateService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = OrdonanceTemplateServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (OrdonanceTemplateServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public ZytologyServiceInt getRemoteContextZytologyService() {
		ZytologyServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = ZytologyService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = ZytologyServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (ZytologyServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public CtgServiceInt getRemoteCTGService() {
		CtgServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = CtgService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = CtgServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (CtgServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public DeliveriesServiceInt getRemoteDeliverieService() {
		DeliveriesServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = DeliverieService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = DeliveriesServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (DeliveriesServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public DoctorLetterServiceInt getRemoteDoctorLettersService() {
		DoctorLetterServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = DoctorLetterService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = DoctorLetterServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (DoctorLetterServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public DoctorLetterTemplateServiceInt getRemoteDoctorLettersTemplateService() {
		DoctorLetterTemplateServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = DoctorLetterTemplateService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = DoctorLetterTemplateServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (DoctorLetterTemplateServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public EchoServiceInt getRemoteEchoService() {
		EchoServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = EchoService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = EchoServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (EchoServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public EGravServiceInt getRemoteEGravService() {
		EGravServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = EGravService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = EGravServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (EGravServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public FormularServiceInt getRemoteFormularService() {
		FormularServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = FormularService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = FormularServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (FormularServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public GravTestServiceInt getRemoteGravTestService() {
		GravTestServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = GravTestService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = GravTestServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (GravTestServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public LaborServiceInt getRemoteLaborbookService() {
		LaborServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = LaborService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = LaborServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (LaborServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public OPHonorarKlasseEins_ServiceInt getRemoteOPHonorarKlasseEinsService() {
		OPHonorarKlasseEins_ServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = OPHonorarKlasseEins_Service.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = OPHonorarKlasseEins_ServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (OPHonorarKlasseEins_ServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public OPHonorarKlasseZwei_ServiceInt getRemoteOPHonorarKlasseZweiService() {
		OPHonorarKlasseZwei_ServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = OPHonorarKlasseZwei_Service.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = OPHonorarKlasseZwei_ServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (OPHonorarKlasseZwei_ServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public ReminderServiceInt getRemoteReminderService() {
		ReminderServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = ReminderService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = ReminderServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (ReminderServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public ReminderTimerServiceInt getRemoteReminderTimerService() {
		ReminderTimerServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = ReminderTimerService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = ReminderTimerServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (ReminderTimerServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public ScanServiceInt getRemoteScanService() {
		ScanServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = ScanService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = ScanServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (ScanServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public TimerActivatorServiceInt getRemoteTimerActivatorService() {
		TimerActivatorServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = TimerActivatorService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = TimerActivatorServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (TimerActivatorServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public VersicherungAntraegeServiceInt getRemoteVersicherungAntraegeService() {
		VersicherungAntraegeServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = VersicherungAntraegeService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = VersicherungAntraegeServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (VersicherungAntraegeServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public OPBillServiceInt getRemoteOPBillServiceInt() {
		OPBillServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = OPBillService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = OPBillServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (OPBillServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public OPBillContentServiceInt getRemoteOPBillContentServiceInt() {
		OPBillContentServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = OPBillContentService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = OPBillContentServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (OPBillContentServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public OPSettlementServiceInt getRemoteOPSettlementServiceInt() {
		OPSettlementServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = OPSettlementService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = OPSettlementServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (OPSettlementServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public OPCodeRateServiceInt getRemoteOPCodeRateServiceInt() {
		OPCodeRateServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = OPCodeRateService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = OPCodeRateServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (OPCodeRateServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public CashBookServiceInt getRemoteCashBookServiceInt() {
		CashBookServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = CashBookService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = CashBookServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (CashBookServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return bean;
	}

	@Override
	public PhysicianLetterServiceInt getRemotePhysicianLetterServiceInt() {
		PhysicianLetterServiceInt bean = null;
		try {
			// 2. Generate JNDI Lookup name
			String modulName = getLookupModuleName();
			
			// The EJB bean implementation class name
			String beanName = PhysicianLetterService.class.getSimpleName();

			// Fully qualified remote interface name
			final String interfaceName = PhysicianLetterServiceInt.class.getName();

			// Create a look up string name
			String lookupName = modulName+ "/" + beanName + "!" + interfaceName;
			
			// 3. Lookup and cast
			bean = (PhysicianLetterServiceInt) context.lookup(lookupName);
		} catch (NamingException e) {
			e.printStackTrace();
			
		}
		return bean;
	}
	
	
}
